// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=1041

//#define COMPILE
#ifdef COMPILE

#include <fstream>

using namespace std;

int n;
int m;

void input() {
    ifstream in("input.txt");
    
    in >> n >> m;
    int i = n;
    for (i = n; i >= 1; i--) {
        if (i * i < n) break;
    }
    n = i + 1;
    int j = m;
    for (j = m; j >= 1; j--) {
        if (j * j <= m) break;
    }
    m = j;
    
    in.close();
}

void output() {
    ofstream out("output.txt");
    if (n > m)
        out << 0;
    else
        for (int i = n; i <= m; i++)
            out << i * i << " ";
    
    out.close();
}

int main() {
    input();
    
    
    output();
    return 0;
}


#endif
